<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%error_log_record}}".
 *
 * @property integer $id
 * @property integer $error_id
 * @property string $ip
 * @property string $create_time
 * @property string $user_agent
 * @property string $system
 */
class ErrorLogRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%error_log_record}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['error_id'], 'integer'],
            [['create_time'], 'safe'],
            [['system'], 'required'],
            [['ip'], 'string', 'max' => 40],
            [['user_agent', 'system'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'error_id' => '错误日志ID',
            'ip' => '访问地址',
            'create_time' => '报错时间',
            'user_agent' => '用户浏览器',
            'system' => '系统',
        ];
    }
}
